#include <iostream>
#include <QApplication>
#include <QScriptEngineDebugger>
#include <QMainWindow>

#include "engine.h"
int main(int argc, char* argv[])
{

    QApplication app(argc, argv);
    QFile topologyFile("topology.json");
    topologyFile.open(QFile::ReadOnly);
    QTextStream topologyStream(&topologyFile);
    QString topology = topologyStream.readAll();
    topologyFile.close();

    QFile algorithmFile("flooding.js");
    algorithmFile.open(QFile::ReadOnly);
    QTextStream algorithmStream(&algorithmFile);
    QString algorithm = algorithmStream.readAll();
    algorithmFile.close();

    Engine engine(topology, algorithm);
    engine.run();

    return app.exec();
}
